using System.Collections;
using System.Collections.Generic;
using System.Collections.Specialized;
using System.IO;
using NetWorkMsg;

namespace NetMsg.Wallpaper
{
    public struct GetWallpaperInfoQ : IServerCallbackable
    {
        
        public uint UnPackableId => 83;
        public uint PackableId => 109;
        
        public void Pack(MemoryStream stream)
        {
            PackAuxiliary.Write(stream, 109u);
        }
    }
    
    public struct GetWallpaperInfoP : IUnPackable
    {
        // 上一次更换壁纸的时间
        public int RefreshTime;
        // 当前使用的壁纸Id
        public int WallpaperId;
        // 当前已解锁的壁纸列表
        public BitVector32 Unlocks;
        
        public const uint Sid = 83;
        
        public void UnPack(MemoryStream stream)
        {
            UnPackAuxiliary.Read(stream, out uint var0);
            RefreshTime = (int)var0;
            UnPackAuxiliary.Read(stream, out uint var1);
            WallpaperId = (int)var1;
            UnPackAuxiliary.Read(stream, out Unlocks);
        }
    }
    
    public struct ChangeWallpaperQ : IServerCallbackable
    {
        public int WallpaperId;
        
        public uint UnPackableId => 84;
        public uint PackableId => 110;
        
        public void Pack(MemoryStream stream)
        {
            PackAuxiliary.Write(stream, 110u);
            PackAuxiliary.Write(stream, (uint)WallpaperId);
        }
    }
    
    public enum ChangeWallpaperResult
    {
        // 成功
        Success,
        // 壁纸没变
        NoChange,
        // 还未解锁
        Locked,
    }
    
    public struct ChangeWallpaperP : IUnPackable
    {
        public ChangeWallpaperResult Result;
        
        public const uint Sid = 84;
        
        public void UnPack(MemoryStream stream)
        {
            UnPackAuxiliary.Read(stream, out uint var0);
            Result = (ChangeWallpaperResult)var0;
        }
    }
    
    public enum WallpaperEnum
    {
        GetWallpaperInfoP,
        ChangeWallpaperP,
    }
}
